package main


import (
"fmt"
"reflect"
"unsafe"
"strconv"
)

func chuli(canshu interface{}){
   if reflect.ValueOf(canshu).Kind() == reflect.Int {
      fmt.Println(canshu)
   }
}


func chumi(in interface{}){
    val :=    reflect.ValueOf(in)

    fmt.Println(val.Elem().Type())

    typ := reflect.TypeOf(1)

    val1 := reflect.New(typ)

    val1.Elem().SetInt(10000)
    
    val.Elem().Set(val1.Elem())

}

type OK struct{
   Key int
   Value int
}


func main(){

  p := 1

  he := new(interface{})

  fmt.Println(strconv.IntSize)

  tem :=  (* int)(unsafe.Pointer((uintptr(unsafe.Pointer(&OK{Key:10,Value:120})) + 8))) 

  *(* int)(tem) = 1200

  fmt.Println(*(* int)(unsafe.Pointer(uintptr(unsafe.Pointer(&OK{Key:10,Value:120})) + 8)))

  

  chumi(he)

  

  fmt.Println(he)

  fmt.Println(p)

}
